/*   1:    */ package com.atomikos.icatch;
/*   2:    */ 
/*   3:    */ public class HeurMixedException
/*   4:    */   extends Exception
/*   5:    */ {
/*   6: 46 */   protected HeuristicMessage[] msgs_ = null;
/*   7: 46 */   protected HeuristicMessage[] commits_ = null;
/*   8: 46 */   protected HeuristicMessage[] aborts_ = null;
/*   9:    */   
/*  10:    */   public HeurMixedException(HeuristicMessage[] msgs)
/*  11:    */   {
/*  12: 56 */     super("Heuristic Exception");
/*  13: 57 */     this.msgs_ = msgs;
/*  14:    */   }
/*  15:    */   
/*  16:    */   public HeurMixedException(HeuristicMessage[] aborts, HeuristicMessage[] commits)
/*  17:    */   {
/*  18: 70 */     super("Heuristic Exception");
/*  19: 71 */     this.aborts_ = aborts;
/*  20: 72 */     this.commits_ = commits;
/*  21:    */   }
/*  22:    */   
/*  23:    */   public HeuristicMessage[] getHeuristicRollbackMessages()
/*  24:    */   {
/*  25: 84 */     return this.aborts_;
/*  26:    */   }
/*  27:    */   
/*  28:    */   public HeuristicMessage[] getHeuristicCommitMessages()
/*  29:    */   {
/*  30: 96 */     return this.commits_;
/*  31:    */   }
/*  32:    */   
/*  33:    */   public HeuristicMessage[] getHeuristicMessages()
/*  34:    */   {
/*  35:107 */     if (this.msgs_ != null) {
/*  36:108 */       return this.msgs_;
/*  37:    */     }
/*  38:110 */     if (this.aborts_ == null) {
/*  39:111 */       return getHeuristicCommitMessages();
/*  40:    */     }
/*  41:112 */     if (this.commits_ == null) {
/*  42:113 */       return getHeuristicRollbackMessages();
/*  43:    */     }
/*  44:115 */     int i = 0;int j = 0;
/*  45:116 */     int len = this.aborts_.length + this.commits_.length;
/*  46:    */     
/*  47:118 */     HeuristicMessage[] msgs = new HeuristicMessage[len];
/*  48:120 */     for (i = 0; i < this.aborts_.length; i++) {
/*  49:121 */       msgs[i] = this.aborts_[i];
/*  50:    */     }
/*  51:122 */     for (j = 0; j < this.commits_.length; j++) {
/*  52:123 */       msgs[(i + j)] = this.commits_[j];
/*  53:    */     }
/*  54:125 */     return msgs;
/*  55:    */   }
/*  56:    */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions-api\3.7.0\transactions-api-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.HeurMixedException
 * JD-Core Version:    0.7.0.1
 */